Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix codegen randomness for chip-tool-darwin. #18276

Conversation

bzbarsky-apple
Copy link
Contributor

We had a race as to who initialized ChipClusters first: the test
generation code (which used includeAll=true) or the command-generation
code (which did not). Since the first init decides the behavior
things were random.

The fix is to consistently use includeAll=true in all of the bits in
chip-tool and chip-tool-darwin, since that's the desired behavior
anyway.

Problem

See above.

Change overview

See above.

Testing

Ran codegen several times and it was stable. CI will tell for sure.

@github-actions
Copy link

github-actions bot commented May 10, 2022

PR #18276: Size comparison from 837b939 to 89a4b61

Full report (13 builds for cyw30739, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 837b939 89a4b61 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 627606 627606 0 0.0
.app_xip_area 530196 530196 0 0.0
.bss 80052 80052 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 626526 626526 0 0.0
.app_xip_area 530572 530572 0 0.0
.bss 78628 78628 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 575278 575278 0 0.0
.app_xip_area 469608 469608 0 0.0
.bss 88048 88048 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
k32w light k32w061+release (read/write) 685148 685148 0 0.0
.bss 81248 81248 0 0.0
.data 2020 2020 0 0.0
.text 600176 600176 0 0.0
lock k32w061+release (read/write) 730528 730528 0 0.0
.bss 81680 81680 0 0.0
.data 1980 1980 0 0.0
.text 645164 645164 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 8934972 8934972 0 0.0
(read/write) 643105 643105 0 0.0
.bss 41105 41105 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 582008 582008 0 0.0
.dynamic 560 560 0 0.0
.got 14976 14976 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 438812 438812 0 0.0
.text 7036884 7036884 0 0.0
thermostat-no-ble arm64 (read only) 2369556 2369556 0 0.0
(read/write) 175153 175153 0 0.0
.bss 86417 86417 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79408 79408 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 146868 146868 0 0.0
.text 1992800 1992800 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2419956 2419956 0 0.0
.bss 205820 205820 0 0.0
.data 5872 5872 0 0.0
.text 1382556 1382556 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1179879 1179879 0 0.0
bss 139680 139680 0 0.0
rodata 151640 151640 0 0.0
text 809840 809840 0 0.0
p6 all-clusters-app default (read/write) 2531536 2531536 0 0.0
.bss 139328 139328 0 0.0
.data 2808 2808 0 0.0
.text 1489800 1489800 0 0.0
light-app default (read/write) 2421496 2421496 0 0.0
.bss 132656 132656 0 0.0
.data 2608 2608 0 0.0
.text 1379760 1379760 0 0.0
lock-app default (read/write) 2431040 2431040 0 0.0
.bss 132472 132472 0 0.0
.data 2568 2568 0 0.0
.text 1389304 1389304 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 806128 806128 0 0.0
bss 72176 72176 0 0.0
noinit 40416 40416 0 0.0
text 572504 572504 0 0.0

We had a race as to who initialized ChipClusters first: the test
generation code (which used includeAll=true) or the command-generation
code (which did not).  Since the first init decides the behavior
things were random.

The fix is to consistently use includeAll=true in all of the bits in
chip-tool and chip-tool-darwin, since that's the desired behavior
anyway.
@bzbarsky-apple bzbarsky-apple force-pushed the fix-chip-tool-darwin-codegen branch from 89a4b61 to a5e6c7d Compare May 10, 2022 20:48
@github-actions
Copy link

github-actions bot commented May 10, 2022

PR #18276: Size comparison from 837b939 to a5e6c7d

Full report (20 builds for cc13x2_26x2, cyw30739, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 837b939 a5e6c7d change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 691019 691019 0 0.0
(read/write) 161332 161332 0 0.0
.bss 75332 75332 0 0.0
.data 3412 3412 0 0.0
.rodata 103083 103083 0 0.0
.text 587452 587452 0 0.0
lock-ftd LP_CC2652R7 (read only) 678543 678543 0 0.0
(read/write) 164912 164912 0 0.0
.bss 73492 73492 0 0.0
.data 3236 3236 0 0.0
.rodata 94823 94823 0 0.0
.text 583240 583240 0 0.0
lock-mtd LP_CC2652R7 (read only) 627303 627303 0 0.0
(read/write) 146308 146308 0 0.0
.bss 69212 69212 0 0.0
.data 3236 3236 0 0.0
.rodata 94711 94711 0 0.0
.text 532104 532104 0 0.0
pump-app LP_CC2652R7 (read only) 663039 663039 0 0.0
(read/write) 181704 181704 0 0.0
.bss 73756 73756 0 0.0
.data 3268 3268 0 0.0
.rodata 80991 80991 0 0.0
.text 581564 581564 0 0.0
pump-controller-app LP_CC2652R7 (read only) 655963 655963 0 0.0
(read/write) 188580 188580 0 0.0
.bss 73812 73812 0 0.0
.data 3232 3232 0 0.0
.rodata 83939 83939 0 0.0
.text 571540 571540 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 627606 627606 0 0.0
.app_xip_area 530196 530196 0 0.0
.bss 80052 80052 0 0.0
.data 708 708 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 626526 626526 0 0.0
.app_xip_area 530572 530572 0 0.0
.bss 78628 78628 0 0.0
.data 672 672 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 575278 575278 0 0.0
.app_xip_area 469608 469608 0 0.0
.bss 88048 88048 0 0.0
.data 584 584 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
esp32 all-clusters-app c3devkit (read only) 1001094 1001094 0 0.0
(read/write) 1475770 1475770 0 0.0
.dram0.bss 68464 68464 0 0.0
.dram0.data 14444 14444 0 0.0
.flash.rodata 208416 208416 0 0.0
.flash.text 1001094 1001094 0 0.0
.iram0.text 62020 62020 0 0.0
m5stack (read only) 1055947 1055947 0 0.0
(read/write) 478184 478184 0 0.0
.dram0.bss 73984 73984 0 0.0
.dram0.data 34184 34184 0 0.0
.flash.rodata 238180 238180 0 0.0
.flash.text 1050563 1050563 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 685148 685148 0 0.0
.bss 81248 81248 0 0.0
.data 2020 2020 0 0.0
.text 600176 600176 0 0.0
lock k32w061+release (read/write) 730528 730528 0 0.0
.bss 81680 81680 0 0.0
.data 1980 1980 0 0.0
.text 645164 645164 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 8934972 8934972 0 0.0
(read/write) 643105 643105 0 0.0
.bss 41105 41105 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 582008 582008 0 0.0
.dynamic 560 560 0 0.0
.got 14976 14976 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 438812 438812 0 0.0
.text 7036884 7036884 0 0.0
thermostat-no-ble arm64 (read only) 2369556 2369556 0 0.0
(read/write) 175153 175153 0 0.0
.bss 86417 86417 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 79408 79408 0 0.0
.dynamic 560 560 0 0.0
.got 4768 4768 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 146868 146868 0 0.0
.text 1992800 1992800 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2419956 2419956 0 0.0
.bss 205820 205820 0 0.0
.data 5872 5872 0 0.0
.text 1382556 1382556 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1179879 1179879 0 0.0
bss 139680 139680 0 0.0
rodata 151640 151640 0 0.0
text 809840 809840 0 0.0
p6 all-clusters-app default (read/write) 2531536 2531536 0 0.0
.bss 139328 139328 0 0.0
.data 2808 2808 0 0.0
.text 1489800 1489800 0 0.0
light-app default (read/write) 2421496 2421496 0 0.0
.bss 132656 132656 0 0.0
.data 2608 2608 0 0.0
.text 1379760 1379760 0 0.0
lock-app default (read/write) 2431040 2431040 0 0.0
.bss 132472 132472 0 0.0
.data 2568 2568 0 0.0
.text 1389304 1389304 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 806128 806128 0 0.0
bss 72176 72176 0 0.0
noinit 40416 40416 0 0.0
text 572504 572504 0 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants